<?php	defined('BASEPATH') OR exit('No direct script access allowed');?>
<html>
<head>
	<meta charset="utf-8" />
	<title>活动添加</title>
	<link rel="stylesheet" href="<?php echo URLPRE;?>static/actioninfo/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="<?php echo URLPRE;?>static/actioninfo/kindeditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="<?php echo URLPRE;?>static/actioninfo/kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="<?php echo URLPRE;?>static/actioninfo/kindeditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="<?php echo URLPRE;?>static/actioninfo/kindeditor/plugins/code/prettify.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="content1"]', {
				cssPath : '<?php echo URLPRE;?>static/actioninfo/kindeditor/plugins/code/prettify.css',
				uploadJson : '<?php echo URLPRE;?>static/actioninfo/kindeditor/php/upload_json.php',
				fileManagerJson : '<?php echo URLPRE;?>static/actioninfo/kindeditor/php/file_manager_json.php',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
</head>
<body>
<div class="nav">
    <ul>
        <li>
            <a  href="<?php echo site_url('weixin/actioninfo')?>">活动预览</a>
        </li>
         <li class="current">
            <a href="<?php echo site_url('weixin/actioninfo/add_view')?>" >添加活动</a>
        </li>
    </ul>
</div>
<form runat="server" name="example" method="post" action="<?php echo site_url('weixin/actioninfo/edit_up/'.$id);?>">
<p>
在此处添加活动
</p>
<table style="line-height:35px;">
<?php foreach($alist as $key=>$val){ ?>
    <tr>
    	<td>标题：</td><td><input type="text" name="actxt" style="width:355px" value="<?php echo $val->aname ?>" /></td>
    </tr>
    <tr>
    	<td>关键字：</td>
        <td><input type="text" name="tkword" width="355px;" style="width:355px" value="<?php echo $val->aword ?>" />多个关键字请用英文半角逗号','隔开</td>
    </tr>
    <tr>
    	<td>内容：</td><td><textarea name="content1" style="width:800px;height:320px;visibility:hidden;"><?php echo htmlspecialchars($val->acont);?></textarea>
		<br />
		</td>
    </tr>
    <tr>
    	<td>开始时间：</td>
        <td><input type="text" name="btime" style="width:355px" value="<?php echo $val->abeginTime ?>" />2015-12-12或2015-12-12 0:9:40</td>
    </tr>
    <tr>
    	<td>结束时间：</td>
        <td><input type="text" name="endtime" style="width:355px" value="<?php echo $val->aendTime ?>" />2015-12-12或2015-12-12 0:9:40</td>
    </tr>
    <tr>
    	<td>活动类型：</td>
        <td>
        <select name="atype" style="width:250px">
        <option value="1" <?php if($val->activtype==1){ echo "selected='selected'";} ?> >刮刮卡</option>
        <option value="2" <?php if($val->activtype==2){ echo "selected='selected'";} ?> >大转盘</option>
        </select><?php if($val->activtype!=1 && $val->activtype!=2) echo "暂无类型"; ?></td>
    </tr>
    <tr>
    	<td>刮奖次数：</td><td><input type="text" name="actimes" style="width:99px" value="<?php echo $val->atimes ?>" />每个活动每个人每天可以刮奖次数</td>
    </tr>
<?php }?>
</table>
<br />
<input type="submit" name="endadd" id="endadd" value="提交内容"  /> (提交快捷键: Ctrl + Enter)
</form>
</body>
</html>